import Vue from 'vue'

export default Vue.prototype.$axios

export const get = (url, params) => {
  return Vue.prototype.$axios({
    url,
    method: 'get',
    params
  })
}

/***
 * 
 * this.$axios.post(this.intranet + ':8001', Qs.stringify({
        action: 'doPrint',
        printerName: PrinterName,
        print_too: 'sumatrapdf',
        printQty: 1,
        label: labelContent,
        type: 'pdf'
    })).then((res) => {
        if (res.data.status === 1) {
            this.$message.success('打印成功')
        } else {
            this.$message.error('打印失败')
        }
    }).catch(() => {
        this.$message.error('打印失败')
    })
 * 
 */